home *** CD-ROM | disk | FTP | other *** search
-
- *********************
- * *
- * DiscMedic v0.92 *
- * *
- * © Tim Browse 1992 *
- * *
- *********************
-
-
- *****************************
- * *
- * This program is CAREWARE! *
- * *
- *****************************
-
-
- This program is Careware - it is not Public Domain. If you consider it
- useful and continue to keep a copy of it please register it with the author.
- There is a fee of £5 for registration, which goes to Comic Relief.
-
- See the end of this file for instructions.
-
- You may distribute this freely, as long as *all* files (except "Options")
- are left unchanged.
-
- I have attempted to test this program to the best of my abilities and
- facilities, but:
-
- I CANNOT BE HELD RESPONSIBLE FOR ANY DAMAGE WHICH MAY BE CAUSED BY THE USE
- OF THIS PROGRAM.
-
- Having said that, it has been tested on ADFS (hard and floppy), Oak SCSI,
- Morley SCSI, and I am reasonably confident that it will work on IDE drives,
- as long as the SWIs are sensibly named. This program is independent of SWI
- numbers for filing systems, but is dependent on SWI names, in particular,
- SCSI systems must prefix their SWIs with "SCSI_" or "SCSIFS_" and IDE
- systems must prefix their SWIs with "IDEFS_".
- If anyone has an IDE system, I would be grateful to hear about DiscMedic's
- successes and failures!
-
- INTRODUCTION
- ------------
-
- Well, it's here, and only about 8 months late. DiscMedic is a desktop disc
- sector editor. It works on FileCore format discs, i.e. L, D, and E format
- ADFS floppies, D and E format ADFS hard-discs, and SCSI, IDE and RamFS
- discs. F format is not yet supported as I don't have an A5000. MS-DOS 720k
- format is supported at a pinch, but with a few quirks - see below for
- details.
-
- DiscMedic can be used to examine and repair discs, extract data from them,
- or just to have a good nose around.
-
- This is a preliminary release, and it will not do the following:
-
- * Undelete files
- * Repair maps/disc records/boot blocks
-
- However, while it won't do this automatically, if you have the necessary
- knowledge, you can do it by hand with DiscMedic. Future versions of
- DiscMedic will do this automatically, as well as providing numerous
- precautionary measures to prevent your beloved data taking a trip to
- Disasterville, Arizona. You will receive an update of these if you are
- registered, and if you provide a blank disc + p&p (I'm not getting paid for
- this you see!) for the purpose.
-
- To start DiscMedic, double click as usual on the filer application, and you
- will be rewarded with a reet lovely icon sitting on your bar.
-
-
- HOW TO USE IT
- -------------
-
- This application is fairly self-explanatory - you can probably guess most of
- the functions by playing. Let's face it, you're not going to read this
- manual are you? I'm wasting me time. However, due to the fault-tolerant
- nature (well, almost) of this program, there are a few quirks which may need
- explanation.
-
- The Main window
- ---------------
-
- Click select on the icon to display the main window. You will see various
- icons which display the current disc parameters - drive, track, head and
- sector. These icons are linked to the disc address icon, so if you adjust
- the parameters, the address follows, and vice versa. The parameters can be
- changed by clicking select on the arrows (adjust has the opposite effect)
- and will change in increments of one. The address icon will change by the
- size of one sector. Holding down SHIFT will multiply these increments by
- 10 for faster adjustment. None of these icons will let you select values
- that do not correspond to a position on the disc.
-
- You have probably noticed that the 'Drive' icon is bordered - clicking on it
- will mount the specified drive. DiscMedic only deals with one drive at a
- time, and does not auto-mount (there are exceptions - see 'Options' below).
- This should be borne in mind, especially with removable media.
-
- Mounting the drive causes DiscMedic to examine the disc record (and boot
- block if a hard disc is selected). It performs a number of consistency
- checks, and may reject it if there are too many errors. If this is the
- case, it substitutes a 'safe' disc record which should let you access most
- of the first track of any disc, enabling you to fix the disc record. If you
- played with the parameters before mounting the disc you will have noticed
- that when no disc is mounted, this safe record is in use, and will not let
- you go past the first track.
-
- The Read and Write icons:
-
- Read
-
- This reads the sector from the specified drive and position. It displays it
- in a scrollable window beneath the main window. This is called the data
- window.
-
- Write
-
- This will write the data in the data window to the specified position on the
- specified drive. If you load data in and attempt to write it out to a
- different disc with a different sector size, the data will be truncated if
- the destination sector is smaller. If the destination is larger, only the
- first part of the sector will be overwritten; e.g. writing a 256 byte sector
- to a 1024 byte sector will overwrite the first 256 bytes and leave the
- remaining 768 bytes unchanged.
- If you write to the area of the disc which contains the disc record (boot
- block for hard discs, sector 0 for floppies) then the drive is automatically
- unmounted.
-
-
- In the top right of the main window is an icon which displays the current
- Filing System (wrt Discmedic) and the disc format, if known. SCSI, IDE and
- RamFS discs are always E format. Clicking on this icon will cycle through
- the available filing systems. The icon below this one indicates what kind
- of data the sector contains:
-
- 'Unknown' indicates the disc is not mounted
-
- 'Data' indicates a normal data sector
-
- 'Zone ...' indicates that the sector is part of an E format map. The
- superscripted number following the zone number indicates
- whether you are in the first or second copy of the map.
-
- 'Boot Block' indicates that the sector is part of (or possibly all of) a
- hard disc boot block.
-
- 'MapSector¹' and
- 'MapSector²' indicate that the sector is part of a L/D format free space map.
-
-
- The Data Window
- ---------------
-
- This is a scrollable resizable window which displays the sector data. The
- grey column on the left indicates the sector offset for each row of data.
- The black text displays hex and ASCII versions of the sector data. Clicking
- select in the window will allow you to move around and edit the data.
-
- The arrow keys move the caret, and holding down control moves as far as
- possible in the specified direction.
-
- The keys 0-9 & A-F will enter hex values in the hex display, and printable
- characters will alter the ASCII display.
-
- To switch between Hex and ASCII, press the TAB key.
-
- When you change data to be different from the original, that data is
- displayed in red. Pressing F8 while over a changed piece of data will
- restore it to its original state.
-
- The behaviour of scrolling and the caret is the same as in Acorn's Edit
- application.
-
-
- The Application Menu
- --------------------
-
- Clicking MENU on the icon bar icon brings up the application menu:
-
-
- Info - displays info about the program, including its Careware status.
-
- Options - allows you to set and save options. This is duplicated in the
- main menu and is explained below.
-
- Quit - I'll let you figure it out, Boo Boo.
-
-
- The Main Menu
- -------------
- Clicking select in any of DiscMedic's windows brings up the main menu:
-
- +-------------+
- | Save ⇨ |
- | Drives ⇨ |
- | Find ⇨ |
- | Checksums ⇨ |
- | Options ⇨ |
- | Misc ⇨ |
- +-------------+
-
- Save
- ====
-
- This submenu will save the current sector data in the usual Risc-OS
- drag-and-drop manner. If you have not loaded any data then a block of zero
- data is saved.
-
- Drives
- ======
-
- This submenu presents a list of what DiscMedic believes to be available
- drives, in iconic form for easy selection. This menu is dynamic and tracks
- Filing Systems dying and starting up, so it should always be an accurate
- reflection of the drives available.
-
- Find
- ====
-
- This leads the the following options:
-
- +-----------+
- | Data |
- | Directory |
- | Map |
- +-----------+
-
-
- Data & Directory
- ----------------
-
- NB: You cannot search MS-DOS format floppy discs. (This will be possible in
- a future version)
-
- The first two options are very similar. They both pop up the Find dialogue
- box, which is used to search for data on the current disc. The writeable
- icon at the top labelled 'Find:' should be edited to contain the string to
- search for.
-
- Whether or not plain data or a directory is being searched for
- is selected by two radio icons. The menu options are just shorthand ways of
- pre-selecting these radio icons.
-
- If 'Directory' is selected, then data is searched for which represents a
- directory of that name on the disc. For instance, if you had a broken
- directory called 'Goodies' somewhere, you could click on 'Directory', type
- 'Goodies' into the search field and start the search. When (assuming the
- directory is relatively undamaged!) DiscMedic finds it you can set about
- repairing it. There is no guarantee in this version that such directory
- sectors found are in use - they may be old deleted data sectors. It is
- suggested that you note down the address, and continue the search until the
- end of the disc to determine which sector(s) to edit. Future versions of
- DiscMedic will scan the directory tree / disc map to find directories.
- To see how this feature works in use, try looking for the root directory -
- type '$' in the search field, select 'Directory', and click on 'Start'.
-
- The High Speed icon will cause DiscMedic to use all available memory to load
- data into, which can result in significant improvements in search times.
- This is most useful on hard discs, but will speed up floppy searches as
- well.
-
- The status area on the right indicates whether DiscMedic is 'Idle' or
- 'Searching', and the gauge gives an indication of how far the search has
- progressed.
-
- Clicking on 'Start' will start searching from the address specified in the
- 'Address' icon in the main DiscMedic window. Therefore, if you want to
- search the whole disc, you must set the address to 00000000 before starting.
-
- While searching, the machine will still multi-task, although with High Speed
- enabled it may be somewhat sluggish, ARM3 permitting.
-
- The search can be stopped by clicking on 'Stop'. You may then continue the
- search by clicking on 'Continue'. You can toggle the high speed search
- option, or change the string to search for, and then continue from where you
- left off. If you alter the Data/Directory icons, you _cannot_ continue the
- search, but must start a new one.
-
- If and when the data is found, DiscMedic will attempt to move to that
- position on the disc and show you the data it found (barring restrictions
- placed on it by the options the user has set - see below). The caret will
- be positioned in the ASCII segment of the data window at the start of the
- data found. If you click on 'Continue' and the string appears later in the
- same sector, the caret will simply be moved to the new position, otherwise
- the search will continue as normal until you interrupt it, the data is
- found, or the end of the disc is reached.
-
- The search may also be paused by closing the Find dialogue box. To resume
- the search simply select Find Data/Directory from the menu again.
-
-
- Map
- ---
-
- This will reset the address and parameter icons to point to the start of the
- free space map on the disc. Clicking on 'Read' (unless auto-read has been
- selected - see options below) will display the first sector of the disc map.
-
-
- Checksums
- =========
-
- +------------------+
- | Zone Checksum |
- | Zone Cross Check |
- | Directory |
- +------------------+
-
- The first two options will be available if the disc sector pointed to by the
- parameter icons is part of an E-format map. The zone checksum checks the
- checksum byte for that sector of the zone, and corrects it if it is wrong.
- The zone cross check compares the cross check bytes of all the other zones
- in the map to ensure they are self consistent - it will also rectify the
- cross-check byte if it is wrong. If the sector is not part of an E-format
- map, then the first two options are greyed out.
-
- The 'Directory' option, on the other hand is always greyed out, as it is not
- yet implemented! It will appear in a future version of DiscMedic.
-
-
- Options
- =======
-
- This submenu displays a dialogue box to set and/or save the DiscMedic
- options. The options are as follows:
-
- Automatic
- ---------
- Read: If set, DiscMedic will automatically read the sector data in
- whenever the disc address, drive, or filing system changes.
-
- Write: If set, Discmedic will automatically save the sector data to disc
- whenever the disc address, drive, or filing system changes.
-
- Checksum: If set, whenever DiscMedic reads in data for part of an E-format
- map, it will check the zone checksum and cross-check bytes and
- correct them if they are wrong.
-
- Warning
- -------
- Read: If set, this will cause DiscMedic to ask for confirmation before
- reading new data in (for *any* reason, including the search
- finding the required data) over sector data which has been edited
- but not saved back to disc.
-
- Write: If set, DiscMedic will ask for confirmation before writing data
- to disc, for whatever reason.
-
- Checksum: If set, DiscMedic will ask for confirmation before correcting
- either the zone checksum or cross-check bytes.
-
-
- Sector Wrap
- -----------
-
- If set, this option causes DiscMedic to alter the 'Head' parameter when the
- 'Sector' parameter loops back to 0, or loops from 0 back to its maximum
- value. Similarly the 'Track' value will change when the 'Head' value
- crosses either of its boundaries. This enables you to step through the disc
- just by altering the 'Sector' parameter. If this option is not set, then if
- you don't try to alter the 'Head' or 'Track' parameters, they won't change.
-
- This option is much easier to understand than it is to explain - just have a
- play about and you'll get the idea.
-
-
- Search delay
- ------------
-
- This specifies the number of centiseconds that DiscMedic pauses for between
- each block of data it searches. It can be from 0 to 99 cs.
-
-
- SAVE and OK
- -----------
-
- Clicking on OK will make the options take effect, whereas SAVE will make
- them take effect, but also save them as the default options for the next
- time DiscMedic is loaded.
-
-
- Misc
- ====
-
- +--------------+
- | Drive Info |
- | Clear Buffer |
- | Undo All |
- +--------------+
-
- Drive Info
- ----------
-
- This will display the disc record window for the currently mounted drive.
- If no drive is mounted, DiscMedic will attempt to mount the specified drive.
-
- The information is fairly self-explanatory - if you don't understand what
- any of the fields mean, then you probably don't want to know.
-
- If you want to know the *exact* number of bytes on the disc (the display
- rounded up to Kb, Mb or Gb - try it and see) then you'll have to load the
- disc record in and work it out from that.
-
- The Comic Relief faces do have a purpose! This window displays the record
- found on the currently mounted disc, and, if the faces are happy, then
- DiscMedic thinks the disc record is OK. If the faces are sad, however,
- DiscMedic does not think the disc record is valid, and is using its own
- 'safe' version of the disc record to access the disc, and access will be
- limited to the first track. This is enough access to fix the disc record by
- hand.
-
-
- Clear Buffer
- ------------
-
- This will zero the data in the data window. Simple enough for ya?
-
-
- Undo All
- --------
-
- This will restore the sector data to its original unedited form.
-
-
-
- Known Bugs and Featurettes
- ==========================
-
- When accessing a D format hard disc with a 'Bad defect list', you can read
- from it, but you can't *write* to it. This is a real pain and I can't
- figure out why - I've wasted enough time already on this. If anyone can
- help with this, drop me a line!
-
-
- Revision History
- ================
-
- 0.91 First public release!
-
- 0.92 Allowed window drag by dragging with Adjust while on (almost) any part
- of the windows.
- Fixed resizing bug - when main window is beneath others and data window
- is resized with select it used to come to the front but the main
- window didn't - now it does. Still haven't fixed case where user
- clicks select on resize icon but doesn't change size - probably have to
- hang some godawful kludge off the redraw code cause wimp refuses to tell
- me about it otherwise *Why* doesn't bringing the window to the top with
- the resize icon cause a window open event???
- Bugs:
- Auto-mount disc if find started with no disc mounted.
- Wimp error 'Input focus window not found' if you close window
- and start search.
- Add support for toggle size on data window
-
- Future Improvements
- ===================
-
- Automation of map/disc record/boot block repair and file recovery.
-
- Saving of any range of data from disc (to byte resolution) to a file.
-
- Loading of a disc file to disc address (to byte resolution).
-
- Delete-tracking.
-
- Auto-backup of disc map, and directory structure.
-
- Faster and more intelligent search.
-
- Indication of defect sectors on E-format discs.
-
- Easy editing of disc records and boot blocks.
-
- Time-travel feature to avoid disasters.
-
- Crossword-solver.
-
- Software implementation of 64 Mb of RAM.
-
- etc. etc.
-
-
- Closing comments
- ================
-
- Well, that's about it. This program was started in May 1991 so you can see
- how long it takes me to get my act in gear.
-
- It was developed on an A440 with Oak SCSIFS and a Serial Port/QDE hard
- drive. It was coded using Acorn C v3, and then Acorn Desktop C v4, which,
- by the way, barring a few irritating features (are you listening DDT?), is
- one of the nicest development environments I've ever used.
-
- It's reasonably robust and has been used in the past (in an older version)
- to resurrect a very large disc drive (512Mb) which had a broken root
- directory, and which wasn't backed up, for a well-known BBS. Mentioning no
- names, but suffice it to say everything's Fiennes now. So it does have some
- uses!
-
- Thanks (directly and indirectly, for various reasons, and in no particular
- order) to:
-
- Philip Colmer (for releasing FileCore details into PD and releasing me
- from my non-disclosure agreement)
- Simon Huntingdon (for Interface)
- Andrew Foyle (for Acorn C)
- Hugo Fiennes (he gets bloody everywhere doesn't he?)
- All at Arcade (Ian, Lorcan, Peter, Outlaw, William, Graham, Philip,
- numerous Steves, Michaels and Daves,
- Emmet, Karen, Alan, Jick,
- and basically everyone else *except* Piers and Jp)
- Jeff Gorton (for assistance/information from Acorn)
- Brian Sterrett (for assistance in communication ;-)
- Jeremy Burton (for motivation)
-
- Music listened to while writing this program:
-
- Due to the time it's taken me, nearly all my CDs..!
-
- Queen, Genesis, Jarre, Tikaram, Collins, Gabriel, Erasure, Sam Brown,
- Fordham, Van Morrison, Level 42, Yazoo, PSB, Spandau Ballet,
- Thin Lizzy, Oldfield, Yes, etc. etc. Happy times!
-
- See you at the Genesis Knebworth gig!
-
-
- If you have any suggestions or bugs, I can be contacted at:
-
- 1, Arkle House,
- 6, Chiltern View Road
- Uxbridge,
- Middlesex.
- UB8 2PA
- ENGLAND
-
- or at Arcade BBS (081-654-2212, 8N1, all speeds) as user #985, "Tim Browse".
-
-
- REGISTRATION
- ============
-
- This product is CAREWARE so if you use it or retain a copy in lieu of
- disasters please please please please please please please please please
- please please please please register it with me - all proceeds go directly
- to charity.
-
-
- In order to register:
- ---------------------
-
- Send me a formatted 3½" disc and return postage, along with your name and
- address (obviously!) and a cheque for £5, made payable to 'Comic Relief'.
- If you wish you can make it more than £5 - I won't complain, and neither
- will Comic Relief! See above for my address.
-
- If you register from Overseas, you must still send a cheque for £5 sterling
- made payable to 'Comic Relief' as I don't want any hassle from the Tax man!
- Sorry!
-
- If you send me two discs + postage I will send you the new version when I
- make any significant upgrades.
-
- If however, you send me a disc and no money, I'll be happy to keep the disc.
-
- Thanks for your time and money. £5 isn't much to ask, so register now!
-
-
-
- Tim Browse
-
- June 1992
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-